<?php /* Smarty version 2.6.20, created on 2013-05-25 01:50:46
         compiled from _core/_include/module/_mvc/view/tablerows/tablerowproducepurchase.tpl */ ?>
function TableRowProducePurchase(tableRow, item, options) {
  this._tableRow = tableRow;
  this._item = item;
  this._options = options;
  this._parent = (options && options.parent) ? options.parent : null;
  this._createElements();
};

TableRowProducePurchase.prototype._createElements = function() {
  var gui, td, unique = MiscUtils.unique();
  
  if (this._parent.disposalstatus == 1  || this._parent.finished == 1) {
    this._tableRow.style.backgroundColor = '#ccc';
  }else{
    this._tableRow.style.backgroundColor = (this._tableRow.rowIndex % 2 != 0) ? '#fff' : '#faf9f4';
  }
  td = this._tableRow.insertCell(-1);
  td.align = 'left';
  td.style.height = '24px';
  if (this._parent.disposalstatus == 1  || this._parent.finished == 1) {
    td.style.borderRight = 'solid 1px #999';
    td.style.borderBottom = 'solid 1px #999';
  }else{
    td.style.borderRight = 'solid 1px #694247';
    td.style.borderBottom = 'solid 1px #694247';
  }
  td.style.padding = '0 0 0 12px';
  td.id = unique + '_name_td';
  
  td = this._tableRow.insertCell(-1);
  td.align = 'left';
  td.style.height = '24px';
  if (this._parent.disposalstatus == 1  || this._parent.finished == 1) {
    td.style.borderRight = 'solid 1px #999';
    td.style.borderBottom = 'solid 1px #999';
  }else{
    td.style.borderRight = 'solid 1px #694247';
    td.style.borderBottom = 'solid 1px #694247';
  }
  td.style.padding = '0 0 0 12px';
  td.id = unique + '_designer_td';
  
  td = this._tableRow.insertCell(-1);
  td.align = 'left';
  td.style.height = '24px';
  if (this._parent.disposalstatus == 1  || this._parent.finished == 1) {
    td.style.borderRight = 'solid 1px #999';
    td.style.borderBottom = 'solid 1px #999';
  }else{
    td.style.borderRight = 'solid 1px #694247';
    td.style.borderBottom = 'solid 1px #694247';
  }
  td.style.padding = '0 0 0 12px';
  td.id = unique + '_task_td';
  
  td = this._tableRow.insertCell(-1);
  td.align = 'center';
  td.style.height = '24px';
  if (this._parent.disposalstatus == 1  || this._parent.finished == 1) {
    td.style.borderRight = 'solid 1px #999';
    td.style.borderBottom = 'solid 1px #999';
  }else{
    td.style.borderRight = 'solid 1px #694247';
    td.style.borderBottom = 'solid 1px #694247';
  }
  td.id = unique + '_date_td';
  
  td = this._tableRow.insertCell(-1);
  td.align = 'left';
  td.style.height = '24px';
  if (this._parent.disposalstatus == 1  || this._parent.finished == 1) {
    td.style.borderRight = 'solid 1px #999';
    td.style.borderBottom = 'solid 1px #999';
  }else{
    td.style.borderRight = 'solid 1px #694247';
    td.style.borderBottom = 'solid 1px #694247';
  }
  td.style.padding = '0 0 0 12px';
  td.id = unique + '_progress_td';
  
  gui = GuiTableRowProducePurchase.instance(unique);
  new HandleTableRowProducePurchase(gui, this._item, this._options);
};